/*
 * Copyright 2008 Nathan C Jones
 * 
 * This file is part of Fivehundred.
 * 
 * Fivehundred is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * 
 * Fivehundred is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
 * details.
 * 
 * You should have received a copy of the GNU General Public License along with
 * Fivehundred. If not, see <http://www.gnu.org/licenses/>. 
 */

package com.googlecode.fivehundred.ui;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.MouseWheelEvent;

/**
 * Records whether a mouse event has been received.
 * 
 * @author Nathan C Jones
 */
class HelperMouseEventRegister extends MouseAdapter {
	private boolean clicked = false;

	private boolean dragged = false;

	private boolean entered = false;

	private boolean moved = false;

	private boolean pressed = false;

	private boolean released = false;

	private boolean wheelMoved;

	private boolean exited;

	@Override
	public void mouseDragged(MouseEvent e) {
		dragged = true;
	}

	@Override
	public void mouseEntered(MouseEvent e) {
		entered = true;
	}

	@Override
	public void mouseExited(MouseEvent e) {
		exited = true;
	}

	@Override
	public void mouseMoved(MouseEvent e) {
		moved = true;
	}

	@Override
	public void mousePressed(MouseEvent e) {
		pressed = true;
	}

	@Override
	public void mouseReleased(MouseEvent e) {
		released = true;
	}

	@Override
	public void mouseWheelMoved(MouseWheelEvent e) {
		wheelMoved = true;
	}

	@Override
	public void mouseClicked(MouseEvent e) {
		clicked = true;
	}

	/** Has a mouse clicked event been received. */
	public boolean isClicked() {
		return clicked;
	}

	/** Has a mouse dragged event been received. */
	public boolean isDragged() {
		return dragged;
	}

	/** Has a mouse entered event been received. */
	public boolean isEntered() {
		return entered;
	}

	/** Has a mouse moved event been received. */
	public boolean isMoved() {
		return moved;
	}

	/** Has a mouse pressed event been received. */
	public boolean isPressed() {
		return pressed;
	}

	/** Has a mouse released event been received. */
	public boolean isReleased() {
		return released;
	}

	/** Has a mouse exited event been received. */
	public boolean isExited() {
		return exited;
	}

	/** Has a mouse wheel moved event been received. */
	public boolean isWheelMoved() {
		return wheelMoved;
	}
}